alter table jms_dm.dm_sqs_qiwei_complaint_network_summary_dt
    set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_sqs_qiwei_complaint_network_summary_dt;
create external table jms_dm.dm_sqs_qiwei_complaint_network_summary_dt
(
    network_code          string comment '网点编码',
    network_name          string comment '网点名称',
    delivery_code         string comment '派件员编码',
    delivery_name         string comment '派件员名称',
    network_type          string comment '网点类型:1-总部,2-代理区,3-加盟商,4-中心,5-集散点,6-网点',
    duty_type             string comment '责任类型',
    virt_code             string comment '虚拟代理区code',
    virt_name             string comment '虚拟代理区name',
    regional_id           string comment '大区ID',
    regional_desc         string comment '大区名称',
    manage_code           string comment '管理大区名称',
    manage_name           string comment '管理大区名称',
    agent_code            string comment '代理区编码',
    agent_name            string comment '代理区名称',
    fran_code             string comment '加盟商编码',
    fran_name             string comment '加盟商名称',
    center_code           string comment '中心编码',
    center_name           string comment '中心名称',
    provider_id           string comment '省份ID',
    provider_desc         string comment '省份',
    city_id               string comment '城市ID',
    city_desc             string comment '城市',
    area_id               string comment '区域id',
    area_desc             string comment '区域name',
    district_code         string comment '片区code',
    district_desc         string comment '片区desc',
    district_id           string comment '片区id',
    complaint_cnt         int comment '客诉量',
    xijia_sign_num        int comment '虚假签收',
    over_time_num         int comment '超时效催件',
    have_take_no_send_num int comment '有揽未发',
    no_send_door_num      int comment '不送货上门',
    service_attitude_num  int comment '服务态度',
    money_problem_num     int comment '费用问题',
    out_complaint_num     int comment '外投诉意向',
    compensate_num        int comment '赔偿意向',
    reback_transfer_num   int comment '退转件票数',
    tak_cnt               int comment '收件量',
    arr_ctn               int comment '到件量',
    date_time             string comment '日期'
)
    COMMENT '企微推送客诉明细网点汇总'
    PARTITIONED BY ( dt STRING COMMENT 't-1')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_sqs_qiwei_complaint_network_summary_dt'
;
